<template>
  <div @click="toggle">
    {{  t("lang.Lang") }}
  </div>
</template>

<script lang="ts" setup>
import { Size } from "@/plugins/element"
import { useAppStore } from "@/stores/app"
import { storeToRefs } from "pinia"
import { useI18n } from "vue-i18n";
const { t, locale: i18nLanguage  } = useI18n()

const toggle = () => {
  if (t("lang.Lang") == '中文') {
    i18nLanguage.value = 'en'  // zh en
  } else {
    i18nLanguage.value = 'zh'  // zh en
  }
}

</script>
<style lang="scss">
.size-icon {
  font-size: 18px;
}
</style>
